package com.lefull.lefullbase.base;

import android.app.Application;
import android.content.Context;

public class LeFullBaseModule {
    private static LeFullBaseModule instance;
    private static Context application;
    public static boolean isNetwork;

    public static LeFullBaseModule getInstance() {
        if (instance == null) {
            synchronized (LeFullBaseModule.class) {
                if (instance == null) {
                    instance = new LeFullBaseModule();
                }
            }
        }
        return instance;
    }

    /**
     * 必须在全局Application先调用，获取context上下文，用于组件使用
     */
    public LeFullBaseModule init(Application app) {
        application = app;
        return this;
    }

    public Context getApplication() {
        return application;
    }
    public boolean isIsNetwork(){
        return isNetwork;
    }
}
